﻿// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// -----------------------------------------------------------------------
using System;
using System.Threading;

namespace Microsoft.Internal
{
    internal static class SynchronizationContextHelpers
    {
        public static void ExecuteOnCreationThread(SynchronizationContext syncContext, SendOrPostCallback callback)
        {
            if (syncContext != null)
            {
                syncContext.Send(callback, null);
            }
            else
            {
                callback(null);
            }
        }
    }
}
